﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Custom="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:pb="clr-namespace:Spritehand.PhysicsBehaviors;assembly=Spritehand.PhysicsBehaviors"
    xmlns:Marble_Phone_Controls="clr-namespace:Marble.Phone.Controls"
    xmlns:GameLogic_Controls="clr-namespace:GameLogic.Controls;assembly=GameLogic"
    mc:Ignorable="d"
    x:Class="Marble.Phone.MarbleGame"
    d:DesignWidth="480"
    d:DesignHeight="800">

    <Grid
        x:Name="LayoutRoot"
        Background="Transparent">
        <Canvas
            x:Name="_root"
            Margin="0">
            <Custom:Interaction.Behaviors>
                <pb:PhysicsControllerBehavior
                    x:Name="_environmentPhysics"
                    GravityVertical="0" MousePickEnabled="True" />
            </Custom:Interaction.Behaviors>
            <Marble_Phone_Controls:MarbleControl x:Name="_marble"
                Height="60"
                Width="60"
                Canvas.Left="264"
                Canvas.Top="288">
            	<Custom:Interaction.Behaviors>
            		<pb:PhysicsObjectBehavior Mass="10"/>
            	</Custom:Interaction.Behaviors>
            </Marble_Phone_Controls:MarbleControl>
            <Marble_Phone_Controls:MarbleControl x:Name="_marble2"
            	Height="100"
            	Width="100"
            	Canvas.Left="76"
            	Canvas.Top="88">
            	<Custom:Interaction.Behaviors>
            		<pb:PhysicsObjectBehavior Mass="5"/>
            	</Custom:Interaction.Behaviors>
            </Marble_Phone_Controls:MarbleControl>
            <Marble_Phone_Controls:MarbleControl x:Name="_marble3"
            	Height="100"
            	Width="50"
            	Canvas.Left="48"
            	Canvas.Top="352">
            	<Custom:Interaction.Behaviors>
            		<pb:PhysicsObjectBehavior Mass="15"/>
            	</Custom:Interaction.Behaviors>
            </Marble_Phone_Controls:MarbleControl>
            <Marble_Phone_Controls:MarbleControl x:Name="_marble4"
            	Height="40"
            	Width="100"
            	Canvas.Left="172"
            	Canvas.Top="568">
            	<Custom:Interaction.Behaviors>
            		<pb:PhysicsObjectBehavior Mass="20"/>
            	</Custom:Interaction.Behaviors>
            </Marble_Phone_Controls:MarbleControl>
            <Marble_Phone_Controls:MarbleControl x:Name="_marble5"
            	Height="80"
            	Width="80"
            	Canvas.Left="284"
            	Canvas.Top="88">
            	<Custom:Interaction.Behaviors>
            		<pb:PhysicsObjectBehavior Mass="25"/>
            	</Custom:Interaction.Behaviors>
            </Marble_Phone_Controls:MarbleControl>
            <Rectangle
                Fill="#FFF4F4F5"
                Height="10"
                Stroke="Black"
                Width="480"
                HorizontalAlignment="Left"
                Canvas.Top="790">
                <Custom:Interaction.Behaviors>
                	<pb:PhysicsObjectBehavior
                		IsStatic="True" />
                </Custom:Interaction.Behaviors>
            </Rectangle>
            <Rectangle
                Fill="#FFF4F4F5"
                Height="800"
                Stroke="Black"
                Width="10"
                HorizontalAlignment="Left">
                <Custom:Interaction.Behaviors>
                    <pb:PhysicsObjectBehavior
                        IsStatic="True" />
                </Custom:Interaction.Behaviors>
            </Rectangle>
            <Rectangle
                Fill="#FFF4F4F5"
                Height="800"
                Stroke="Black"
                Width="10"
                HorizontalAlignment="Left"
                Canvas.Left="472">
                <Custom:Interaction.Behaviors>
                    <pb:PhysicsObjectBehavior
                        IsStatic="True" />
                </Custom:Interaction.Behaviors>
            </Rectangle>
            <Rectangle
                Fill="#FFF4F4F5"
                Height="10"
                Stroke="Black"
                Width="480"
                HorizontalAlignment="Left">
                <Custom:Interaction.Behaviors>
                    <pb:PhysicsObjectBehavior
                        IsStatic="True" />
                </Custom:Interaction.Behaviors>
            </Rectangle>
            <StackPanel Margin="12,12,0,0">
            	<TextBlock x:Name="_gravHLabel" TextWrapping="Wrap" Text="TextBlock" d:LayoutOverrides="Width"/>
            	<TextBlock x:Name="_gravVLabel" TextWrapping="Wrap" Text="TextBlock" d:LayoutOverrides="Width"/>
            </StackPanel>
        </Canvas>
        <GameLogic_Controls:AccelerometerHelper
            x:Name="_sensor"
            IsSensorEnabled="True"
            Margin="0"
            d:LayoutOverrides="Width, Height"
            VerticalAlignment="Bottom"
            HorizontalAlignment="Right" />
    </Grid>
</UserControl>